<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加内容</title>
<load href="__PUBLIC__/css/bootstrap.min.css" />
<import type='css' file="css.main" />
<load href="__PUBLIC__/js/jquery-1.9.1.min.js" />
<load href="__PUBLIC__/js/jquery-ui.min.js" />
<import type='js' file="js.main" />
<import type='js' file="js.setshowflag" />
<script type="text/javascript">
$(function(){
	$("select[name='tpl']").change(function(){
		var selectedIndex = $(this).get(0).selectedIndex;
		$(".thumbpreview:eq("+selectedIndex+")").show().siblings().hide();
	})
})
</script>
</head>

<body id="body">
<assign name='id' value="$Think.get.resid" />
<div>
	<!-- 图片资源开始 -->
	<div class="floatBackground" id="floatBackground" style="display: none; left: 0px;">
		<div class="bounced" style="margin-left: 20px;">
		<label class="closeImgResurces">X</label>
		<iframe id="imgResourcesiframe" src="{:rtrim(U('Upload/index'),'.html')}" width="750" height="465" frameborder="0" scrolling="auto"></iframe>
		</div>
	</div>
	<!-- 图片资源结束 -->
	<div class="addobject">
		<div class="obj-form">
			<form name="form1" id="form1" action="{:U('resourcebanneradd',array('resourceid'=>$id))}" method="post" class="form-inline">
				<ul>
                    <li>
						<label class="fl tle">广告图片：</label>
						<span class="fl cnt"><input name="bannerimg" id="bannerimg" class="form-control" placeholder="广告图片" style="width: 450px;"><a class="browse" f='bannerimg'>浏览···</a></span>
					</li>
					<li>
						<label class="fl tle">链接地址：</label>
						<span class="fl cnt">
						<input name="bannerlink" class="form-control" placeholder="链接地址" style="width: 450px;">
						</span>
					</li>
					<li>
						<label class="fl tle">排序：</label>
						<span class="fl cnt">
						<input name="bannersort" class="form-control" placeholder="排序" style="width: 100px;">
						</span>
					</li>
					<li class="submit">
						<label class="fl tle">&nbsp;</label>
						<span class="fl cnt"><input type="submit" value="添 加" class="submitbtn" /></span>
					</li>
				</ul>
			</form>
		</div>
	</div>
	<style type="text/css">
	.showimg{border-top: solid 1px #ccc; padding: 5px; padding-top: 10px; margin-top: 12px;}
	.showimg li{display: block; float: left; width: 150px; margin-bottom: 12px; margin-left: 12px; position: relative; overflow: hidden;}
	.showimg li a{color: #333; font-size: 16px; position: absolute; bottom: 0px; right: 0px; background-color: rgba(0,0,0,.6); border-radius: 5px 0px 0px 0px; padding:5px; color: #fff;}
	.showimg li a:hover{background-color: #FF6666;}
	.showimg img{width: 100%;}
	</style>
	<div class="showimg">
		<ul>
			<volist name="bannerlist" id="v">
			<li><img src="{$v['bannerimg']}"><a href="{:U('resourcedelete',array('id'=>$v['id']))}">删除</a></li>
			</volist>
		</ul>
	</div>

</div>
</body>
</html>
